cmake_minimum_required(VERSION 3.20)
project(xlog)

set(BUILD_SHARED_LIBS OFF) #静态库
#cmake 传递变量给C++
add_definitions(-Dxlog_STATIC)#默认值是1

#提供信息的变量
message("MSVC=" ${MSVC})
message("MSVC=" ${WIN32})
message("MSVC=" ${UNIX})
message("CMAKE_SYSTEM_NAME= " ${CMAKE_SYSTEM_NAME})

set(CMAKE_COLOR_MAKEFILE OFF)
add_library(${PROJECT_NAME} xlog.cpp xlog.h)
